#include "wasm_wrapper.h"
#include "ast_to_json.hpp"

using cyclone::parser::AstToJson;
using cyclone::parser::ParseOption;

const char *parse(char *kind, char *valueRaw)
{
    AstToJson parser;
    return parser.parse(ParseOption{false, false, kind, valueRaw}).dump().c_str();
}

const char *parseLoose(char *kind, char *valueRaw)
{
    AstToJson parser;
    return parser.parseLoose(ParseOption{false, false, kind, valueRaw}).dump().c_str();
}
